{%extends "MssaeSeoBundle::layout.html.twig"%}
{%block body%}
<h1>Inscritpion de {{entity.projet.nom}}</h1>
{% if is_granted("IS_AUTHENTICATED_REMEMBERED") %}
<table class="record_properties">
    <tbody>
    {%if is_granted('ROLE_ADMIN')%}          
        <tr>
            <th>Id</th>
            <td>{{ entity.id }}</td>
        </tr>
        <tr>
            <th>UserName</th>
            <td>{{ entity.user.username }}</td>
        </tr>
    {%endif%}        
        <tr>
            <th>Anuaire</th>
            <td>{{ entity.annuaire.url }}</td>
        </tr>
        <tr>
            <th>Commentaire</th>
            <td>{{ entity.commentaire }}</td>
        </tr>
        <tr>
            <th>Create_at</th>
            <td>{{ entity.createat|date('Y-m-d H:i:s') }}</td>
        </tr>
        <tr>
            <th>Update_at</th>
            <td>{{ entity.updateat|date('Y-m-d H:i:s') }}</td>
        </tr>
        <tr>
            <th>Statut</th>
            <td>{{ entity.statut }}</td>
        </tr>
    </tbody>
</table>
{%endif%}
<ul class="record_actions">
{% if is_granted("IS_AUTHENTICATED_REMEMBERED") %}  
    {%if (entity.user.id == app.user.id) or (is_granted('ROLE_ADMIN'))%}
    <li>
        <a href="{{ path('projetannuaire_edit', { 'id': entity.id, 'idProject' : idProject }) }}">
            Edit
        </a>
    </li>
    {%endif%}
    <li>
        <a href="{{ path('projetannuaire_new', {'idProject' : idProject}) }}">
            Create a new entry
        </a>
    </li>    
    <li>
        <a href="{{ path('projetannuaire', {'idProject' : idProject }) }}">
            Back to the list
        </a>
    </li>    
{%endif%}    
{%if is_granted('ROLE_ADMIN')%}  
    <li>
        <form action="{{ path('projetannuaire_delete', { 'id': entity.id, 'idProject' : idProject }) }}" method="post">
            {{ form_widget(delete_form) }}
            <button type="submit">Delete</button>
        </form>
    </li>
{%endif%}    
</ul>
 {%endblock%}